The present invention relates to an exclusive control method and circuit for controlling conflicting access requests to a resource shared by processors making up a computer system, and to an event communication method and circuit for communicating events among these processors by way of a main memory shared thereby.
One representative database system for searching a large-scale database at high speed is a database system operating on a parallel computer system comprising of plural processors. Another large-scale, high-speed database system is a distributed database system run on a client-server type distributed processing system including plural computers. In the present specification the computer elements for executing distributed processing of the distributed processing system may be called nodes, when both processor elements constituting the parallel computer system and computers making up the client-server type distributed processing system are referred to.
In the distributed database system, the database is retained in disk apparatuses in a distributed manner. Plural nodes process a retrieval request from a user in cooperation. That is, the multiple nodes access the disk apparatuses holding different portions of the database designated by the retrieval request in parallel, and process the database portions are. In this operation, plural access requests may be issued from plural nodes to the same database portion. In that case, it is necessary to control these accesses exclusively, so that a series of access requests from the same node are allowed to be completed and access requests from other nodes are prohibited before completion of the former access requests, if the results of accesses for these access requests are to be guaranteed.
Meanwhile, the parallel computer system needs to communicate efficiently occurrence of events among numerous-processor elements (abbreviated to a PE hereunder) operating in parallel. It is particularly necessary to communicate events at high speed in executing such nondeterministic processes as database retrieval or knowledge,processing, because a large number of asynchronous events are exchanged among PE""s.
Enhancement of the event processing speed is also needed in order to implement high-speed barrier synchronization and like between PE""s, described, in executing routine programs such as one for numerical computation later.
One disadvantage of the prior art related to exclusive control that is large overhead related to resource access arbitration in a resource managing node comprising a resource accessible by other nodes, and the retrieval processing initially intended to be performed by the resource managing node is such interfered by this arbitration. In addition, conventional event communication methods have the deficiency that overhead for event detection is large and performance of each PE tends to be degraded.
It is therefore an object of the present invention to provide an exclusive control method and a computer system for high-speed arbitration, so that one of plural exclusive use requests issued by plural nodes for the same resource is selected rapidly.
It is a specific object of the present invention to provide an exclusive control method and a computer system which enable arbitration of plurality of exclusive use requests issued from nodes for a resource managed by one node be executed by a circuit other than the processor of the node, thereby reducing the arbitration time and the load of the processor.
It is another object of the present invention to provide a computer system adapted in eliminating superfluous operations of accessing the main storage where no flag is written, when event flags posted via a shared main storage are detected by periodic polling.
It is a further object of the present invention to provide a computer system adapted in reducing the number of flag areas to be accessed, when event flags posted via a shared main storage are detected either by periodic polling or by polling on the occasion of writing of a flag.
It is an even further object of the present invention to provide a computer system capable of reducing overhead in detecting a value of the same event flag by polling, where the flag value may be changed by other PE""s via a shared main storage.
In achieving the foregoing objects of the present invention regarding exclusive control, each node stores use status information on exclusive use state of a resource usable by the nodes. When one node is to issue an exclusive use request requesting for the resource, it is judged whether the resource is in exclusive use state on the basis of the use state information stored in the one node.
If the resource is in an exclusive use state, the one node is inhibited from issuing the exclusive use request; if the resource is not in an exclusive use state, the node is allowed to issue the exclusive use request.
Exclusive use requests issued by nodes are transmitted over a network to an exclusive use arbitration circuit accessible by these nodes. Of the transmitted exclusive use requests, one that will exclusively use the resource is selected by the arbitration circuit.
When one exclusive use request is selected by the arbitration circuit, the use state information stored in each node regarding the resource is updated to new use state information indicating that the resource is now in exclusive use state.
According to the exclusive control method of the present invention superfluous exclusive use requests are suppressed, and amount of arbitration processing on such useless requests is reduced, because an access requesting node issues an access request after detecting in that node that the resource is not in exclusive use state.
In a computer system for executing the exclusive control method mentioned above, the arbitration circuit composed of one provided in common to nodes constituting the network. This arbitration circuit judges whether or not to grant exclusive use to an exclusive use request issued by one of the nodes.
In a preferred mode of a computer system according to the present invention, the arbitration circuit comprises plural arbitration circuits distributed in the nodes. Each node using its arbitration circuit judges whether or not to grant exclusive use to the exclusive use request issued by the node.
In another preferred structure of a computer system according to the present invention, the arbitration circuit comprises an arbitration circuit located in a node having the resource. On the basis of the use state information stored in the node about the resource, the arbitration circuit judges whether or not to grant exclusive use to the exclusive use request issued by the one node. The result of the judgment is notified to all nodes.
In achieving the foregoing objects of the present invention related to event communication, a computer system according to the present invention comprises: an area judgment circuit responsive to a write request issued by one of the processing units, for judging whether a storage location in a main storage designated by the write request is one of flag areas each of which is provided in correspondence to one of processing units and into each of which to write a flag indicating occurrence of an event; a polling register provided in correspondence to each processing unit and accessed repeatedly by the each processing unit; and a write circuit for writing information indicating occurrence of an event into the polling register corresponding to one of the processing unit when the storage location designated by the write request is judged by the area judgment circuit as one of the flag areas:provided to the one processing unit.
In the above computer system, useless accesses to the flag areas are prevented in cases where no flag has been written to any of these flag areas, because each processing unit polls the flag areas in the main storage only when the information indicating occurrence of an event is set in the polling register.
A further mode of a computer system according to the invention further comprises a storage device provided in correspondence to each processing unit, for holding an address of the storage location designated by that write request when the storage location designated by a write request is judged by the area judgment circuit as one of the flag areas provided for the each processing unit.
The storage device can hold addresses and is accessible by the each processing unit.
The processing unit notified of the storage location address selectively accesses only the flag area having the address held by the storage device but need not access any other flag areas where no flags are written.
Another preferred mode of a computer system according to the present invention, further comprises a storage device provided in correspondence to each processing unit for holding the processing unit number of a processing unit having issued the write request. This storage device can hold plural processing unit numbers, and can be accessed by the each processing unit. The storage device enables the each processing unit to judge easily which processing unit has written a flag. Writing of flags can be distinguished by use of the storage device, even when plural processing units have successively written flags into the same flag area.
A still further mode of a computer system according to the present comprises: a read request circuit responsive to an atomic access request which requests execution of an operation on data held in a main storage and writing of a result of the operation into the main storage, for supplying the main storage with a read request requesting data be read from a storage location in the main storage which has an address designated by the atomic access request; an operating unit for performing the operation designated by the atomic access request on the data read from the main storage according to the read request; a write request circuit for supplying the main storage with a write request requesting that operation result data provided by the operation unit be written into that storage location in the main storage; a value judgment circuit for judging whether the operation result data has a predetermined value indicating occurrence of an event; an area judgment circuit responsive to the write request, for judging whether the storage location having an address designated by the atomic access request is one of flag areas each provided in correspondence to one of the processing units and is to each of which to write a klag for informing occurrence of an event; and an informing circuit responsive to judgment by the value judgment circuit that the operation result data has the predetermined value and to judgment by the area judgment circuit that the storage location designated by the write request is one of the flag areas provided in correspondence to one of the processing units, for informing that one processing unit of occurrence of an event.
In the above computer system, it is possible to inform the one processing unit of occurrence of an event, when the written flag value reaches a predetermined value, in case flags are written repeatedly into the same flag area, and the flag value is changed every time a write operation is carried out.
The present invention outlined above applies preferably where a shared main storage is distributed among the PE""s but applies to other cases.
These and other objects, features and advantages of the invention will become more clear upon reading of the following description and appended drawings.